//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
#ifndef CPROP_RUN_HPP
#define CPROP_RUN_HPP

#include "CWindow.h"
#include "GenericPropClasses.hpp"

#define MAXLEN_TERMINAL_NAME 16

class CPropRun : public CTerminalPropPage
{
public:
	virtual BOOL Validate();
	virtual BOOL StoreData();
	CPropRun (CTerminalPropSheet *pOwner = NULL);
	~CPropRun();

	virtual BOOL WriteRegistrySettings();
	virtual BOOL ReadRegistrySettings();


	LPCTSTR GetId()
	{ return TEXT("General"); }

	BEGIN_MSG_MAP(CPropRun)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		NOTIFY_HANDLER (0, PSN_SETACTIVE, OnSetActive)
		COMMAND_HANDLER(IDC_RUN     , BN_CLICKED, OnRunCheck )
		COMMAND_HANDLER(IDC_HIDE_IE , BN_CLICKED, OnSetReboot)
		COMMAND_HANDLER(IDC_HIDE_RDP, BN_CLICKED, OnSetReboot)

		CHAIN_MSG_MAP (CTerminalPropPage)
	END_MSG_MAP()

	LRESULT OnSetActive (int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnRunCheck (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnSetReboot(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);

protected:
	BOOL  m_hideConfig;
	BOOL  m_hideWeb;
	BOOL  m_hideStdRDP;
	BOOL  m_runCheckBox;
	TCHAR m_cmdLine[MAX_PATH];
	TCHAR m_cmdArgs[MAX_PATH];

	CWindow m_hideConfigWin;
	CWindow m_hideWebWin;
	CWindow m_hideStdRDPWin;
	CWindow m_runCheckBoxWin;
	CWindow m_cmdLineWin;
	CWindow m_cmdArgsWin;

};


#endif // CPROP_RUN_HPP
